import request from '@/utils/request'
// 分页查询
export function page(query) {
  return request({
    url: '/business/agent/page',
    method: 'post',
    data: query
  })
}

// 查询参数详细
export function getById(id) {
  return request({
    url: '/business/agent/' + id,
    method: 'get'
  })
}
// 新增或添加
export function addOrUpdate(data) {
  return request({
    url: '/business/agent/addOrUpdate',
    method: 'post',
    data: data
  })
}
// 删除参数配置
export function deleteById(id) {
  return request({
    url: '/business/agent/' + id,
    method: 'delete'
  })
}

//充值
export function recharge(info) {
  return request({
    url: '/business/agent/recharge/' + info,
    method: 'GET'
  })
}

export function settlement(data) {
  return request({
    url: '/business/order/settlement' ,
    method: 'POST',
    data
  })
}

// 结算记录
export function settlementList(data) {
  return request({
    url: '/business/settlement/page' ,
    method: 'POST',
    data
  })
}
// 待结算订单
export function settlementOrder(data) {
  return request({
    url: '/business/settlement/settlementPage' ,
    method: 'POST',
    data
  })
}